<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

class TRealdataAcsta extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('t_realdata_ACSta', function (Blueprint $table) {
             $table->engine = 'MEMORY';
             $table->charset = 'utf8';
             $table->collation = 'utf8_general_ci';
            // CONTENT
            $table->datetime('rd_updatetime')->nullable()->default(null)->comment('');
			$table->unsignedInteger('pdi_index')->nullable(false)->default(0)->comment('');
			$table->boolean('rd_ACSta1')->nullable()->default(0)->comment('');
			$table->boolean('rd_ACSta2')->nullable()->default(0)->comment('');
			$table->boolean('rd_ACSta3')->nullable()->default(0)->comment('');
			$table->boolean('rd_ACSta4')->nullable()->default(0)->comment('');
			$table->boolean('rd_ACSta5')->nullable()->default(0)->comment('');
			$table->boolean('rd_ACSta6')->nullable()->default(0)->comment('');
			$table->boolean('rd_ACSta7')->nullable()->default(0)->comment('');
			$table->boolean('rd_ACSta8')->nullable()->default(0)->comment('');
			$table->boolean('rd_NetCom')->nullable()->default(0)->comment('');
			$table->unique('pdi_index', 'pdi_index');
			
        });

        
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('t_realdata_ACSta');
    }
}
